import java.awt.event.*;
import java.io.*;
import java.lang.reflect.*;
import java.util.*;
import javax.swing.*;
import javax.swing.event.*;

/**
 * Remote control server.
 */
class Google extends LocalServer {

  protected boolean showIP() {return true;}

  /** Shows something on google. */
  private abstract class GoogleHandler extends AbstractURLHandler {
    GoogleHandler(String name) {
      super("http://" + (name != null ? name + "." : "") + "google.com");
    }
  }

  /** Shows the browser. */
  private class BrowserHandler extends GoogleHandler {
    BrowserHandler() {
      super(null);
    }
  }

  /** Shows the calendar. */
  private class CalendarHandler extends GoogleHandler {
    CalendarHandler() {
      super("calendar");
    }
  }

  /** Shows the stocks. */
  private class StocksHandler extends GoogleHandler {
    StocksHandler() {
      super("finance");
    }
  }

  /** Shows the maps. */
  private class MapsHandler extends GoogleHandler {
    MapsHandler() {
      super("maps");
    }
  }

  /** Shows the photos. */
  private class PhotosHandler extends GoogleHandler {
    PhotosHandler() {
      super("photos");
    }
  }

  /** Shows the mail. */
  private class MailHandler extends GoogleHandler {
    MailHandler() {
      super("mail");
    }
  }

  /** Shows the blogs. */
  private class ReaderHandler extends GoogleHandler {
    ReaderHandler() {
      super("reader");
    }
  }

  /** Shows Youtube. */
  private class YouTubeHandler extends AbstractURLHandler {
    YouTubeHandler() {
      super("http://youtube.com");
    }
  }

  /** Shows Weather. */
  private class WeatherHandler extends AbstractURLHandler {
    WeatherHandler() {
      super("http://weather.com");
    }
  }


  Handler[] getHandlers() {
    return new Handler[] {
      new BrowserHandler(),
      new CalendarHandler(),
      new StocksHandler(),
      new MapsHandler(),
      new PhotosHandler(),
      new MailHandler(),
      new ReaderHandler(),
      new YouTubeHandler(),
      new WeatherHandler(),
    };
  }

  public static void main(String args[]) {
    new Google().realMain(args);
  }
  
}
